package com.link2room.ironhide.controller.api;

import com.link2room.common.dto.result.base.BaseResultDto;
import com.link2room.common.dto.param.base.BaseParamDto;
import com.link2room.common.dto.result.base.L2RGroupBaseInfoDto;
import com.link2room.ironhide.facade.IGroupFacadeService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * Created by sss on 2016/10/11.
 */
@Api(tags= "集团")
@RestController
@RequestMapping("/api/Groups")
public class GroupApiController {
    @Resource
    private IGroupFacadeService groupFacadeService;

    @ApiOperation(value = "集团基础信息",response = L2RGroupBaseInfoDto.class)
    @RequestMapping(value = "/Group",method = RequestMethod.GET)
    public BaseResultDto getGroupInfo(
    ) throws Exception {
        BaseParamDto baseParamDto=new BaseParamDto();
        L2RGroupBaseInfoDto groupBaseInfoDto = groupFacadeService.getGroupBaseInfo(baseParamDto);
        BaseResultDto l2rRs=new BaseResultDto();
        l2rRs.setResultCode(0);
        l2rRs.setResultInfo(groupBaseInfoDto);
        return l2rRs;
    }
}
